/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cpal.entrenamiento.dao.impl;

import com.cpal.entrenamiento.dao.ISubCategoriaDAO;
import com.cpal.entrenamiento.entity.SubCategoria;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.dao.DataAccessException;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Repository;

/**
 *
 * @author Omar
 */
@Repository
public class SubCategoriaDAO extends SqlMapClientDaoSupport implements ISubCategoriaDAO{

    @Override
    public List<SubCategoria> obtenerSubCategorias(Integer codigoCategoria) throws DataAccessException {
        Map<String, Object> parameterMap = new HashMap<String, Object>();
        parameterMap.put("codigoCategoria", codigoCategoria);
        return getSqlMapClientTemplate().queryForList("buscarSubCategoria",parameterMap);
    }

    @Override
    public List<SubCategoria> obtenerSubCategorias() throws DataAccessException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public SubCategoria obtenerSubCategoria(Integer codigoSubCategoria) throws DataAccessException {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
}
